<?php
/**
 * User: b179a9
 * Date: 9/20/11
 * Time: 5:57 PM
 */

class Zend_View_Helper_Pages extends Zend_View_Helper_Abstract
{

    function pages($pages)
    {
        $output = '<ul>';
        foreach ($pages as $page) {
            $output .= "<li id=\"{$page['id']}\">";
            $output .= "<a href=\"#\">{$page['title']}</a> ";
            $output .= $page['title'];
            if (count($page['children'])) {
                $output .= $this->pages($page['children']);
            }
            $output .= '</li>';
        }
        $output .= '</ul>';
        return $output;
    }

}
